<template>
    <h2>Home组件</h2>
</template>

<script setup name="Home" lang="ts">
import { onMounted } from "vue";
import { useRouter } from "vue-router";
const router=useRouter()
// 编程式跳转
onMounted(()=>{
    setTimeout(()=>{
        router.push('/news')
    },3000)
})
</script>
